<?php

/**
 * ContactForm class.
 * ContactForm is the data structure for keeping
 * contact form data. It is used by the 'contact' action of 'SiteController'.
 */
class UserSettingForm extends CFormModel
{
	/**
	 * Who can create an user account such as admin, guest...
	 */
	public $who_can_register;
	/**
	 * Do we need an verification email send to user when an account is created
	 */
	public $email_verify_required;
	/**
	 * The email notification title in case the account is created by admin
	 */
	public $email_notification_title_admin;
	/**
	 * The email notification body in case the account is created by admin
	 */
	public $email_notification_body_admin;
	/**
	 * The email notification title in case the account is created by a guest but the account must be aproval by admin
	 */
	public $email_notification_title_approval;
	/**
	 * The email notification body in case the account is created by a guest but the account must be approval by admin
	 */
	public $email_notification_body_approval;
	/**
	 * The email notification title in case the account is created by a guest with no approval by admin
	 */
	public $email_notification_title;
	/**
	 * The email notification body in case the acoount is created by a guest with no approval by admin
	 */
	public $email_notification_body;
	/**
	 * The mail notification title for password recovery
	 */
	public $email_notification_title_password;
	/**
	 * The mail notification body for password recovery
	 */
	public $email_notification_body_password;
	/**
	 * The email notification title when the account is activated
	 */
	public $email_notification_title_activated;
	/**
	 * The email notification body when the account is activated
	 */
	public $email_notification_body_activated;
	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			// name, email, subject and body are required
			array('name, email, subject, body', 'required'),
			// email has to be a valid email address
			array('email', 'email'),
			// verifyCode needs to be entered correctly
			array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
		);
	}

	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'who_can_register'=>'Who can register account?',
			'email_verify_required'=>'Require e-mail verification when a visitor creates an account.',
			'email_notification_title_admin'=>'Email title',
			'$email_notification_body_admin'=>'Body'
		);
	}
}